package com.blacktech.dbu.auth.dto;

import com.blacktech.dbu.core.dict.UserType;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 创建用户请求DTO
 *
 * @author Yanyunsong
 */
@Data
public class CreateUserRequest {

    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 50, message = "用户名长度必须在3-50个字符之间")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, message = "密码长度不能少于6位")
    private String password;

    @NotBlank(message = "显示名称不能为空")
    @Size(max = 100, message = "显示名称不能超过100个字符")
    private String displayName;

    @Email(message = "邮箱格式不正确")
    @Size(max = 100, message = "邮箱不能超过100个字符")
    private String email;

    @NotNull(message = "用户类型不能为空")
    private UserType userType;

    /**
     * 备注
     */
    private String remark;
}